﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using CsharpTrainer.NHibernate3;
using CsharpTrainer.NHibernate3.Mapping;
using Zeus.Thunder.Core;

namespace SharpTrainer.NHibernate
{
    class CategoryTest : ITestCase
    {
        public void Run()
        {
            string connStr = ConfigurationManager.ConnectionStrings["NH3TrainConnStr"].ConnectionString;

            try
            {
                NHibernateDb<ArticleMap> db = new NHibernateDb<ArticleMap>(connStr);
                db.CreateDatabase();
                Console.WriteLine("Create Database Successfully!");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception: " + ex.ToString());
            }
        }
    }
}
